<?php
    require "offlinecache.php";

$url = $_GET['url'];

$xml = getCached($url);

if ($xml == "")
{
    // Open the Curl session
    $session = curl_init($url);

    // Don't return HTTP headers. Do return the contents of the call
    curl_setopt($session, CURLOPT_HEADER, false);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

    // Make the call
    $xml = curl_exec($session);

    curl_close($session);
}
echo $xml;


?>
